/*
 * @Author: '137' '1432417996@qq.com'
 * @Date: 2025-03-25 16:30:29
 * @LastEditors: 137 '1432417996@qq.com'
 * @LastEditTime: 2025-04-09 14:52:10
 * @FilePath: \starter-3\api\file.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { request } from '@/api/request'
// 更新头像
export function updateMyAvatarEdit(data) {
    return request({
        url: '/my/avatar/edit',
        method: 'post',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: data
    })
}

// 上传文件
export function uploadFile(data) {
    return request({
        url: '/file/upload',
        method: 'post',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: data
    })
}

// 自动识别链接
export function commonUrlFavicon(query) {
    return request({
        url: '/common/url/favicon',
        method: 'post',
        params: query
    })
}


// 反馈表单
export function feedbackForm(data) {
    return request({
        url: `/form-data/feedback`,
        method: 'post',
        data: data
    })
}

// 反馈表单类型
export function feedbackFormTypes() {
    return request({
        url: `/form-data/feedback/types`,
        method: 'get',
    })
}

// 获取当前用户ip
export function commonIpCurrent() {
    return request({
        url: `/common/ip/current`,
        method: 'get',
    })
}
